<%-- 
    Document   : adHome
    Created on : May 9, 2012, 5:01:08 PM
    Author     : ciummo
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>


<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="/DGestWebServer/css/dgest.css"/>
        
        
        <title><bean:message key="adminpage.title.welcome"/> <bean:write name="LoginActionForm" property="username"/></title>
    </head>
    <body>
        
        
        <%@ include file="adminDialogBar.jspf" %> 
        
        <logic:equal name="LoginActionForm" property="role" value="Admin Dialog" scope="session">
        
        <div id="subMenu"><html:link page="/Order.do?method=newOrder"><img src="/DGestWebServer/images/orderAdd.png" alt="Add Order" height="125px" width="125px"/></html:link></div>
        </logic:equal>
        
        <br>
        <h1> Gestisci Ordini </h1>
        <br>
        
        <table class="objectList">
            
            <caption class="tabs"><ul class="tabs">

                    
                    <logic:equal name="view" value="all"><li class="active"></logic:equal> 
                    <logic:notEqual name="view" value="all"><li class="tabs"></logic:notEqual>    
                        
                        <html:link page="/Order.do?method=listOrders&view=all">Tutti</html:link>
                    </li>
                    
                    <logic:equal name="view" value="Pronto"><li class="active"></logic:equal> 
                    <logic:notEqual name="view" value="Pronto"><li class="tabs"></logic:notEqual>    
                        
                        <html:link page="/Order.do?method=listOrders&view=Pronto">Pronto</html:link>
                    </li>                    

                    
                    <logic:equal name="view" value="In Elaborazione"><li class="active"></logic:equal> 
                    <logic:notEqual name="view" value="In Elaborazione"><li class="tabs"></logic:notEqual>
                        
                        <html:link page="/Order.do?method=listOrders&view=In Elaborazione">In Elaborazione</html:link>
                    </li>
                    

                    
                    <logic:equal name="view" value="In Spedizione"><li class="active"></logic:equal> 
                    <logic:notEqual name="view" value="In Spedizione"><li class="tabs"></logic:notEqual>
                        
                        <html:link page="/Order.do?method=listOrders&view=In Spedizione">In Spedizione</html:link>
                    </li>
                    

                    
                    
            </ul></caption>
            
            <thead>
                <tr>

                    <th></th>
                    <th><bean:message key="order.id"/></th>
                    <th>Evasione Richiesta</th>
                    <th><bean:message key="order.state"/></th>
                    <th><bean:message key="order.note"/></th>
                </tr>
            </thead>

            <tbody>

                <logic:iterate id="order" name="OrderActionForm" property="list" indexId="index" >
                    <pg:item>
                        <tr>
                            <td>
                                <html:link href="Order.do?method=orderDetails" paramId="id" paramName="order" paramProperty="idOrdine"><img src="/DGestWebServer/images/view.png" alt="View Order Details" height="25px" width="25px"/></html:link>

                                <logic:equal name="LoginActionForm" property="role" value="Admin Dialog" scope="session">
                                <html:link href="Order.do?method=modifyOrder" paramId="idOrder" paramName="order" paramProperty="idOrdine"><img src="/DGestWebServer/images/edit.jpg" alt="Modify Order" height="25px" width="25px"/></html:link>
                                </logic:equal>
                            </td>

                            <td><bean:write name="order" property="idOrdine"></bean:write></td>                                                                              
                            <td><bean:write name="order" property="dataEvasione"></bean:write></td>
                            <td><bean:write name="order" property="stato"></bean:write></td>
                            <td><bean:write name="order" property="note"></bean:write></td>
                        </tr>    
                    </pg:item>
                </logic:iterate>

            </tbody>
        </table>


    <%@ include file="footBar.jspf" %>             

    </body>
</html>
